#ifndef C_STRUCTS_H
#define C_STRUCTS_H

#include <time.h>         // time_t
#include <stdint.h>       // int64_t

// C/C++ structures for database tables

/* To create new database table:
   1. Define structure 'Newbie' for database table "newbies" in this header file.

   2. Run following command in the console to generate migration file:
      $ sqtool      make:migration  create_newbies_table  (generate C   migration file)
      $ sqtool-cpp  make:migration  create_newbies_table  (generate C++ migration file)

      This will append data in  migrations-declarations
                                migrations-elements
                                migrations-files.c     (appended by sqtool)
                            or  migrations-files.cpp   (appended by sqtool-cpp)

   3. Edit generated migration file  yyyy_MM_dd_HHmmss_create_newbies_table.c    (generated by sqtool)
                                 or  yyyy_MM_dd_HHmmss_create_newbies_table.cpp  (generated by sqtool-cpp)
      in folder ../database/migrations/
 */

/* Run following command in the console to generate migration file for struct User.
      $ sqtool      make:migration  create_users_table  (generate C   migration file)
      $ sqtool-cpp  make:migration  create_users_table  (generate C++ migration file)
 */
typedef struct User {
	int        id;
	int        age;
	char      *name;
	char      *email;
	time_t     created_at;
	time_t     updated_at;
} User;


#endif  // C_STRUCTS_H
